You would use the capability provided by _eeee_xxxx_ssss_tttt_rrrr on an application program
that needs to run in an international environment and have messages print
in more than one language. _eeee_xxxx_ssss_tttt_rrrr replaces text strings with function
calls that point at strings in a message database. The database used
depends on the runtime value of the _LLLL_CCCC______MMMM_EEEE_SSSS_SSSS_AAAA_GGGG_EEEE_SSSS environment variable [see
_eeee_nnnn_vvvv_iiii_rrrr_oooo_nnnn(5)].
The first step is to use _eeee_xxxx_ssss_tttt_rrrr _----_eeee to extract a list of strings and save
it in a file. Next, examine this list and determine which strings can be
translated and subsequently retrieved by the message retrieval function.
Then, modify this file by deleting lines that can't be translated and,
for lines that can be translated, by adding the message file names and
the message numbers as the fourth (_m_s_g_f_i_l_e) and fifth (_m_s_g_n_u_m) entries on
a line. The message files named must have been created by _mmmm_kkkk_mmmm_ssss_gggg_ssss(1) and
exist in _////_uuuu_ssss_rrrr_////_llll_iiii_bbbb_////_llll_oooo_cccc_aaaa_llll_eeee_////_l_o_c_a_l_e_////_LLLL_CCCC______MMMM_EEEE_SSSS_SSSS_AAAA_GGGG_EEEE_SSSS. The directory _l_o_c_a_l_e
corresponds to the language in which the text strings are written [see
_ssss_eeee_tttt_llll_oooo_cccc_aaaa_llll_eeee(3C)]. The message numbers used must correspond to the sequence
numbers of strings in the message files.
Now use this modified file as input to _eeee_xxxx_ssss_tttt_rrrr _----_rrrr to produce a new version
of the original C language source file in which the strings have been
replaced by calls to the message retrieval function _gggg_eeee_tttt_tttt_xxxx_tttt. The _m_s_g_f_i_l_e
and _m_s_g_n_u_m fields are used to construct the first argument to _gggg_eeee_tttt_tttt_xxxx_tttt.
The second argument to _gggg_eeee_tttt_tttt_xxxx_tttt is printed if the message retrieval fails
at run time. This argument is the null string, unless the _----_dddd option is
used.
This utility cannot replace strings in all instances. For example, a
static initialized character string cannot be replaced by a function
call, or a string could be in the form of an escape sequence that cannot
be translated. In order not to break existing code, the files created by
invoking _eeee_xxxx_ssss_tttt_rrrr _----_eeee must be examined and lines containing strings not
replaceable by function calls must be deleted. In some cases the code may
require modifications so that strings can be extracted and replaced by
calls to the message retrieval function.
EEEEXXXXAAAAMMMMPPPPLLLLEEEESSSS
The following examples show uses of _eeee_xxxx_ssss_tttt_rrrr.
Assume that the file _ffff_oooo_oooo_...._cccc contains two strings:
_eeee_xxxx_ssss_tttt_rrrr _----_eeee _ffff_oooo_oooo_...._cccc _>>>> _ffff_oooo_oooo_...._ssss_tttt_rrrr_iiii_nnnn_gggg_ssss_oooo_uuuu_tttt produces the following output in the file
The _eeee_xxxx_ssss_tttt_rrrr utility can now be invoked with the _----_rrrr option to replace the
strings in the source file by calls to the message retrieval function
_gggg_eeee_tttt_tttt_xxxx_tttt.
_eeee_xxxx_ssss_tttt_rrrr _----_rrrr _ffff_oooo_oooo_...._cccc _<<<<_ffff_oooo_oooo_...._ssss_tttt_rrrr_iiii_nnnn_gggg_ssss_oooo_uuuu_tttt _>>>>_iiii_nnnn_tttt_llll_ffff_oooo_oooo_...._cccc produces the following output:
_eeee_xxxx_ssss_tttt_rrrr _----_rrrr_dddd _ffff_oooo_oooo_...._cccc _<<<<_ffff_oooo_oooo_...._ssss_tttt_rrrr_iiii_nnnn_gggg_ssss_oooo_uuuu_tttt _>>>>_iiii_nnnn_tttt_llll_ffff_oooo_oooo_...._cccc uses the extracted strings as
a second argument to _gggg_eeee_tttt_tttt_xxxx_tttt.